Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A logging library that combines the simplicity and convenience of debug with the power of bunyan
A logging library that combines the simplicity and convenience of debug with the power of bunyan.
Install the package via npm
:
$ npm install debugnyan --save
Create a logger by giving it a namespace and then call bunyan's log methods on the returned instance.
By default, similarly to debug
's behaviour, loggers do not output any content. Each logger output can be selectively activated by using the DEBUG
environment variable.
Pattern matching is based on the logger's name and it can optionally contain colons (:
) to create (sub)-components properties on the logger instance.
Consider a logger named foo:bar:biz
:
bunyan
logger with name foo
bunyan
(simple) child logger with property component
equal to bar
.var logger1 = require('debugnyan')('foo');
var logger2 = require('debugnyan')('foo:bar');
logger1.debug('net');
logger2.debug('qux');
Example output with DEBUG=foo
:
DEBUG=foo node example.js
{"name":"foo","hostname":"ruimarinho","pid":1,"level":20,"msg":"net","time":"2016-10-04T18:54:14.530Z","v":0}
{"name":"foo","hostname":"ruimarinho","pid":1,"component":"bar","level":20,"msg":"qux","time":"2016-10-04T18:54:14.531Z","v":0}
Example output with DEBUG=foo:bar
:
DEBUG=foo:bar node example.js
{"name":"foo","hostname":"ruimarinho","pid":2,"component":"bar","level":20,"msg":"qux","time":"2016-10-04T18:55:08.217Z","v":0}
The prefix
and suffix
for each component is also customizable:
var logger = require('debugnyan')('foo', {}, { suffix: 'module' });
$ npm test
$ npm version [<newversion> | major | minor | patch] -m "Release %s"
MIT
v1.0.0 (2016-09-28)
FAQs
A logging library that combines the simplicity and convenience of debug with the power of bunyan
The npm package debugnyan receives a total of 7,787 weekly downloads. As such, debugnyan popularity was classified as popular.
We found that debugnyan demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.